package com.zhiyou.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zhiyou.mapper.BookMapper;
import com.zhiyou.model.Book;
import com.zhiyou.service.BookService;
@Service
public class BookServiceImpl implements BookService{

	@Autowired
	BookMapper bookMapper;

	@Override
	public void add(Book book) {
		bookMapper.add(book);
	}

	@Override
	public void update(Book book) {
		bookMapper.update(book);
	}

	@Override
	public void delete(int id) {
		bookMapper.delete(id);
	}

	@Override
	public Book selectById(int id) {
		return bookMapper.selectById(id);
	}

	@Override
	public List<Book> selectAll(int id, int type) {
		return bookMapper.selectAll(id, type);
	}

	@Override
	public List<Book> selectByName(String name) {
		return bookMapper.selectByName(name);
	}

	@Override
	public void deleteAll(int[] ids) {
		bookMapper.deleteAll(ids);
		
	}
	
}
